﻿namespace EasyBuyShop.Utils
{
    public class LogHelper
    {

        public static NLog.Logger logger;

        public static void LoadConfiguration()
        {
            if (logger == null)
            {
                NLog.LogManager.LoadConfiguration("nlog.config");
                logger = NLog.LogManager.GetCurrentClassLogger();
            }
           
        }

        public static void Info(string message)
        {
            logger.Info(message);
        }

        public static void Warn(string message)
        {
            logger.Warn(message);
        }

        public static void Error(string message)
        {
            logger.Error(message);
        }

        public static void Fatal(string message)
        {
            logger.Fatal(message);
        }
    }
}
